<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:p="http://primefaces.org/ui"
             xmlns:f="http://java.sun.com/jsf/core">
 
 
		<p:panel header="Identification">
			<h:form>

				<h:panelGrid columns="1" cellspacing="5">

					<h:panelGrid columns="2" columnClasses="labelf1">

						<h:outputText value="#{msgs.titulo}" />
						<p:inputText value="#{protocolMB.identification.title}" id="title" size="93" />

					</h:panelGrid>

					<h:panelGrid columns="2" columnClasses="labelf1">

						<h:outputText value="#{msgs.tema}" />
						<p:inputText value="#{protocolMB.identification.theme}" id="theme"  size="93" />

					</h:panelGrid>

					<h:panelGrid columns="4"
						columnClasses="labelf1, inputf1, label2f1, inputf1">

						<h:outputText value="#{msgs.areaTecnica}" />
						<p:inputText value="#{protocolMB.identification.technicalArea}"
							size="35" converter="areaConv" />

						<h:outputText value="#{msgs.afiliacao}" />
						<p:inputText value="#{protocolMB.identification.affiliation}"
							size="35" converter="filConv" />

					</h:panelGrid>

					<h:panelGrid columns="4"
						columnClasses="labelf1, inputf1, label2f1, inputf1">

						<h:outputText value="#{msgs.estado}" />
						<p:inputText value="#{protocolMB.identification.state}" size="35"
							converter="stateConv" />

						<h:outputText value="#{msgs.cidade}" />
						<p:inputText value="#{protocolMB.identification.city}" size="35"
							converter="cityConv" />

					</h:panelGrid>

					<h:panelGrid columns="4"
						columnClasses="labelf1, inputf1, label2f1, inputf1">

						<h:outputText value="#{msgs.dataDeInicio}" />
						<p:calendar value="#{protocolMB.identification.startDate}"
							id="dataI" size="35" />

						<h:outputText value="#{msgs.dataDeTermino}" />
						<p:calendar value="#{protocolMB.identification.endDate}"
							id="dataF" size="35" />

					</h:panelGrid>

					<h:panelGrid columns="3" cellspacing="5" columnClasses="labelf1">

						<h:outputText value="#{msgs.pesquisadores}" />
						<p:selectOneMenu id="rr" value="#{protocolMB.researcher}"  style="width:160px;" converter="researchConverter">
							<f:selectItem itemLabel="Select One" itemValue="#{null}" />
							<f:selectItems value="#{protocolMB.listResearcher}" var="researchers" itemLabel="#{researchers.name}" itemValue="#{researchers}" />
						</p:selectOneMenu>

						<p:commandButton  value="Adicionar" update="pesq, rr" actionListener="#{protocolMB.adicionarPesquisador}" icon="ui-icon-add" />

					</h:panelGrid>

					<p:dataTable id="pesq" var="res"
						value="#{protocolMB.listResearcher2}">
						<p:column headerText="Nome">
							<h:outputText value="#{res.name}" />
						</p:column>
						<p:column>
							<p:commandButton
								actionListener="#{protocolMB.removePesquisador(res)}" />
						</p:column>
					</p:dataTable>

					<h:panelGrid rowClasses="botao" width="100%">
						<h:form>
							<p:commandButton action="#{protocolMB.pagCharacterization}" value="Próximo" ajax="false"/>
						</h:form>
					</h:panelGrid>
				</h:panelGrid>
			</h:form>
		</p:panel>
</ui:fragment>